<%@ page contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>物资采购与产品整合管理系统</title>
<link href="${pageContext.request.contextPath }/css/main.css" rel="stylesheet" type="text/css" media="all" />
<script src="${pageContext.request.contextPath }/js/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/js/jquery-3.2.1.js"></script>
</head>
<script>
</script>
<body class="content-pages-body">
<div class="content-pages-wrap">
	<div class="commonTitle">
	  <h2>&gt;&gt; 订单管理</h2>
	</div>
    <form id="form-search" name="form-search" action="${pageContext.request.contextPath}/order.do?op=query" method="post">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="commonTableSearch">
        <tr>
            <th align="right">订单编码：</th>
            <td><input  name="ordercode" type="text" class="inputTextNormal" id="textfield1" value="${ordercode}" /></td>
            <th align="right">订单保存时间：</th>
            <td><input  name="orderdate" type="text" class="inputTextNormal" id="textfield2" value="${orderdate}"/></td>
            <td align="right">订单状态：</td>
            <td><select name="orderflag">
                <option value="">--请选择--</option>
                <c:forEach items="${orderFlags}" var="flag">
                    <option value="${flag.code}" <c:if test="${orderFlag==flag.code}">selected</c:if> >${flag.name}</option>
                </c:forEach>
            </select></td>
            <th align="right">
				<input  id="secbtn" type="submit" class="btnShort" value="检索" />
			</th>
        </tr>
        <tr>

          </tr>
    </table>
    </form>

    <!--//commonTableSearch-->
    
	<input type="button" class="btnNormal" value="创建订单" onclick="location.href='${pageContext.request.contextPath }/order.do?op=add'"/>

	<br>

    <table width="101%" border="0" cellpadding="0" cellspacing="1" class="commonTable">
        <tr>
            <th>序号</th>
            <th>订单编码</th>
            <th>订单保存时间</th>
            <th>订单状态</th>
            <th class="editColDefault">操作</th>
        </tr>
        <c:forEach items="${pageInfo.list}" var="order">
    <tr>
            <td align="center">${order.orderid}</td>
            <td align="center">${order.ordercode}</td>
            <td align="center">${order.orderdate}</td>
			<td align="center"><c:choose>
                <c:when test="${order.orderflag==2}">
                    <span style="color:blue ">${order.name}</span>
                </c:when>   
                <c:when test="${order.orderflag==3}">
                <span style="color:#22fa5c ">${order.name}</span>
            </c:when>      
                <c:when test="${order.orderflag==4}">
                <span style="color:red">${order.name}</span>
            </c:when>
                <c:otherwise>
                    <span>${order.name}</span>
                </c:otherwise>
            </c:choose>
            </td>
            <td align="center">
                <a href="system-order-view.html" class="btnIconView" title="查看详情"></a>
                <c:if test="${order.orderflag=='1'}">
                    <a href="${pageContext.request.contextPath}/order.do?op=edit&orderid=${order.orderid}" class="btnIconEdit" title="更新"></a>
                    <a href="${pageContext.request.contextPath}/order.do?op=delete&orderid=${order.orderid}" class="btnIconDel" title="删除"></a>
                </c:if>
            </td>
        </tr>
        </c:forEach>
  </table>
    <div>
        <%@include file="/page/common/subpage.jsp" %>
    </div>
</div>
<!--//content pages wrap-->
</body>
</html>
